<html>
    <head>

    </head>
    <body>
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
        <div id="app">
            <input type="text" v-model="message" @keyup.enter="getMessage"></input>
            <div>{{message}}</div>
        </div>
        <script>
            var app=new Vue({
                el:"#app",
                data:{
                    message:"vue.js"
                },
                methods: {
                    doIt:function(p1,p2){
                        console.info('做IT')
                        console.info(p1+p2)
                    },
                    sayHi:function(){
                        alert(this.value)
                    },
                    getMessage:function(){
                        alert(this.message)
                    }
                }
            })
        </script>
    </body>
</html>